package com.zjj.distributed.zk.microservice.consumer.controller;

import com.zjj.lbw.common.bean.R;
import com.zjj.lbw.service.api.order.feign.OrderFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhanglei.zjj
 * @description 用户服务mvc层
 * @date 2023/6/22 21:40
 */
@RestController
@RequestMapping("/user")
@Slf4j
public class UserController {
    @Autowired
    private OrderFeignClient orderFeignClient;

    @RequestMapping(value = "/findOrderByUserId/{id}")
    public R findOrderByUserId(@PathVariable("id") Integer id) {
        R result = orderFeignClient.findOrderByUserId(id);

        return result;
    }
}
